package com.dfqy.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * Author : atyushu
 * Package : com.dfqy.pojo
 * ClassName : Join
 * Create : 2023/8/2 - 9:02
 * Version : v1.0
 * Description : The class of pojo for join.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("预约活动讲座")
public class Join implements Serializable {

    @NotNull
    private long id;

    @ApiModelProperty("用户编号")
    private long userid;

    @ApiModelProperty("参加时间")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date jointime;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("参加人名称")
    private String uname;

    @ApiModelProperty("是否已出席")
    private byte isattend;

    @ApiModelProperty("活动编号")
    private long eventid;

    public Join(long userid, Date jointime, String phone, String uname, byte isattend, long eventid) {
        this.userid = userid;
        this.jointime = jointime;
        this.phone = phone;
        this.uname = uname;
        this.isattend = isattend;
        this.eventid = eventid;
    }
}
